<?php if(!defined('BASEPATH')) exit ('No direct script access allowed');

class Tribute extends public_controller
{
	
	public function __construct() {
		parent:: __construct();
		$this->template->set_layout('person_layout');
		$this->load->helper('date');
	}

	public function index() {
		if(!$this->session->userdata('loginStatus')) redirect('landing');
		$current_person_id = (int)$this->uri->segment(2);
		$infoPerson = $this->person_model->get_person($current_person_id);
		$this->current_person_id = $current_person_id;
		$total_video = $this->db->select('id')->get_where('person_video', array('personId' => $current_person_id))->num_rows();
		$videos = array();

		$this->template->title('Tribute', 'Dead project')
			->set(array('videos' => $videos, 'total_video' => $total_video, 'infoPerson' => $infoPerson))
			->build('tribute/index');
	}
}